<?php
    $string = 'This is an example string & and this a tutorial .';
    $string1 = 'This is an example string & and this a tutorial. Boom Boom Boom';
    $string_word_count = str_word_count($string,1,'.&');//word count
    $string_shuffled = str_shuffle($string);            //rsndom shuffle
    $half = substr($string, 0, strlen($string)/2);      //substring
    $string_reversed = strrev($string);                 //reverse
    similar_text($string,$string1,$result);             //simlarity %
    $string_trimmed = trim($string);                    //trim whitespace from left and right
    $string_slashes = htmlentities(addslashes($string));//add slashes to escape html or others for security
    print_r($string_word_count);
    echo 'Shuffled: '.$string_shuffled;
    echo '<br>Halfed: '.$half;
    echo '<br>Rversed: '.$string_reversed;
    echo '<br>Simlarity between two strings: '.$result;
    echo '<br>Trimmed White Space: '.$string_trimmed;
    echo '<br>String Slashes: '.$string_slashes;
?>